package restaurant;

/**
 * Represents comment items. This class contains information about the comments
 * submitted by customers.
 * 
 * @author Odessa
 */

public class Comment
{

	/** The comment number. */
	private int commentNo;

	/** The comment. */
	private String comment;

	/** Whether or not the comment is offensive. The default is {@code false}. */
	private boolean offensive = false;



	/**
	 * Instantiates a newly created comment.
	 * 
	 * @param commentNo the comment number of the comment to be created.
	 * @param comment a {@code String} representing this comment.
	 */
	public Comment(int commentNo, String comment) {
		this.commentNo = commentNo;
		this.comment = comment;
	}



	/**
	 * Instantiates a newly created comment with just the comment number.
	 * 
	 * @param commentNo the comment number of the comment to be created.
	 */
	protected Comment(int commentNo) {
		this.commentNo = commentNo;
	}



	/**
	 * Gets the comment number. The comment number is used to uniquely identify
	 * each comment.
	 * 
	 * @return the comment number.
	 */
	public int getCommentNo()
	{
		return commentNo;
	}



	/**
	 * Gets the comment.
	 * 
	 * @return the comment.
	 */
	public String getComment()
	{
		return comment;
	}



	/**
	 * Checks if the comment is offensive.
	 * 
	 * @return {@code true} if the comment is offensive.
	 */
	public boolean isOffensive()
	{
		return offensive;
	}



	/**
	 * Sets a comment as being offensive.
	 */
	public void setOffensive()
	{
		offensive = true;
	}
}
